﻿using Admin.Core.Model.Xsproject;
using Admin.Core.Service.Xsproject.Project.Input;
using Admin.Core.Service.Xsproject.Project.Output;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;

namespace Admin.Core.Service.Xsproject.Project
{
        /// <summary>
        /// 映射配置
        /// 双向映射 .ReverseMap()
        /// </summary>
        public class MapConfig : Profile
        {
            public MapConfig()
            {
            //新增
            CreateMap<ProjectAddInput, ProjectEntity>();
            //CreateMap<XbcTypeUpdateInput, XbcType>();
            //修改
            //查询
            CreateMap<ProjectEntity, ProjectGetOutput>();
            //CreateMap<ProjectEntity, ProjectListOutput>().ForMember(
            //  d => d.Status,
            //  m => m.MapFrom(s =>s.Status==0?"新建": s.Status ==1? "执行中": s.Status == 2?"已完成":"")
            //).ForMember(
            //  d => d.Model,
            //  m => m.MapFrom(s => s.Mode.Name )
            //);
            //CreateMap<XbcType, XbcTypeConfOutput>();  0 新建  1 执行中  2 已完成
        }
    }
}
